package FileControl;

import java.io.File;

import FileControl.Source.AbstractCopy;
import FileControl.Source.CopyDir;
import FileControl.Source.CopyFile;
import FileControl.Source.Sync;

public class FileControl extends AbstractCopy {

	public static boolean copy(File source, File dest) {
		if(source.isDirectory()) {
			return CopyDir.recursiveCopyDir(source, dest);
		}
		else {
			return CopyFile.copyDestCheck(source, dest);
		}
	}
	
	public static boolean sync(File source, File dest) {
		if(source.isDirectory()) {
			return Sync.syncDir(source, dest);
		}
		else {
			return Sync.syncFile(source, dest);
		}
	}
}
